

<table width="460" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  <tr>
	<td width="20" height="20"><img src="images/c1.jpg" width="21" height="21" /></td>
	<td style="border-top:solid 1px #4087C3;">&nbsp;</td>
	<td width="20" height="20"><img src="images/c2.jpg" width="21" height="21" /></td>
  </tr>
  <tr>
	<td style="border-left:solid 1px #4087C3;">&nbsp;</td>
	<td style="font-family:verdana; font-size:12px; line-height:24px; color:#0066CC">
	<div><span style="font-size:14px">Selected Date: <b><?=date("F d, Y", mktime(0, 0, 0, $_GET['nmonth'], $_GET['nday'], $_GET['nyear']));?></b></span></div>
    
    <?php 
	$result = mysql_query("SELECT * FROM tbl_slot ") or die (mysql_error());
	while ($row = mysql_fetch_array($result)){
	    $table = $row['ntable'];
		$time = $row['ntime'];
		if($table=='A'){
			$ncust = '2-4';
		}
		if($table=='B'){
			$ncust = '6-10';
		}
		if($table=='C'){
			$ncust = '11-16';
		}		
		$sdate = $_GET['nmonth'].'/'.$_GET['nday'].'/'.$_GET['nyear'];
		$nresult = mysql_query("SELECT * FROM tbl_reservation WHERE selected_date='$sdate' && selected_table='$table' && selected_time='$time'  ") or die (mysql_error());
		if($nrow = mysql_fetch_array($nresult)){
		}else{
			echo '
				<div style="width:120px; height:110px; border:solid 2px #FF0000; float:left; cursor:pointer; margin-right:15px; margin-top:15px;" align="center" onclick="location.href=\'reservation.php?step=3&table='.$table.'&time='.$time.'&nday='.$_GET['nday'].'&nmonth='.$_GET['nmonth'].'&nyear='.$_GET['nyear'].'\'"><br />
					<span style="font-family:arial; font-size:26px"><b>Table '.$table.'</b></span><br />
					<span style="font-family:arial; font-size:16px"><b>'.$time.'</b></span><br>
					<span style="font-family:arial; font-size:16px"><b>'.$ncust.' persons</b></span>
				</div>
			';	
		}
	}	  
	?>  
	
	
	</td>
	<td style="border-right:solid 1px #4087C3;">&nbsp;</td>
  </tr>
  <tr>
	<td width="20" height="20"><img src="images/c4.jpg" width="21" height="21" /></td>
	<td style="border-bottom:solid 1px #4087C3;">&nbsp;</td>
	<td width="20" height="20"><img src="images/c3.jpg" width="21" height="21" /></td>
  </tr>
</table>